<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Application_Controllers_Complain_ActionAddComplain
{
    public $errorMessage="";
    public function preAdd($form){
        return true;
    }
    public function onAdd($form){

        $timeStamp = mktime(date('H'),date('i'), date('s')
                            ,date('m'),date('d'),date('y'));
        $dob_disp1=strftime('%Y-%m-%d %H:%M:%S',$timeStamp);
        $complain = new Application_Model_DbTable_Complain();
        $array=array('title'=>$form->getValue('title'),
                    'complain'=>$form->getValue('complain'),
                    'buyer_id'=>$form->getValue('buyer_id'),
                    'time'=>$dob_disp1,
                    'status'=>0);
        $complain->insert($array);
    }
}
?>
